function resample_out = resample_sim(array_in, filt_coeff, levels)

dec_factor = 2; % dyadic pyramid assumed

for lev = 1:levels

    if(lev == 1)
        filter_in = array_in;
    else
        filter_in = lpdxy_out;
    end    
    
    filter_out = conv2_sim(filter_in, filt_coeff);
    lpdxy_out = decimate_sim(filter_out, dec_factor, 0);   
    %pixel_select - 0 : select first pixel in the window and drop the rest,
    %1 : select last pixel in the window and drop the rest
    
end
resample_out = lpdxy_out;
